#include "app_mqtt.h"
#include "log/log.h"
#include <unistd.h>

/*处理远程数据的回调函数*/
 int recv_cb(char* data,int len){
    log_info("处理接收数据：%s,长度：%d",data,len);
    return 0;
}

int main(void){
    app_mqtt_init();
    /*注册回调函数*/
    app_mqtt_registerRecvCallBack(recv_cb);

    app_mqtt_send("HELLO WORLD",11);

    sleep(50);

    app_mqtt_close();

    return 0;
}